package cultu.framework.dao;

import java.util.List;

import cultu.core.message.CriteriaBase;

/**
 * interface de base pour les DAO.
 *
 * @author pmuseur
 * @param <T> the generic type
 * @param <CRIT> the generic type
 * @param <SCENAR> the generic type
 */
public interface BaseDAO<T, CRIT extends CriteriaBase,SCENAR> 
{
    
    /**
     * Creates the.
     *
     * @param t the t
     * @return the t
     */
    T create(T t);
    
    /**
     * Gets the.
     *
     * @param t the t
     * @param s the s
     * @return the t
     */
    T get(T t,SCENAR s);

    /**
     * Update.
     *
     * @param t the t
     * @return the t
     */
    T update(T t);
    
    /**
     * Delete.
     *
     * @param t the t
     * @return the t
     */
    T delete(T t);

    /**
     * Creates the.
     *
     * @param pList the list
     * @return the list
     */
    List<T> create(List<T> pList);
    
    /**
     * Delete.
     *
     * @param pList the list
     * @return the list
     */
    List<T> delete(List<T> pList);
    
    /**
     * Update.
     *
     * @param pList the list
     * @return the list
     */
    List<T> update(List<T> pList);
    
    /**
     * Find.
     *
     * @param pCriteria the criteria
     * @param s the s
     * @return the list
     */
    List<T> find(CRIT pCriteria,SCENAR s);
    
    /**
     * Count.
     *
     * @param pCriteria the criteria
     * @param s the s
     * @return the long
     */
    Long count(CRIT pCriteria, SCENAR s);
}
